<!--
 * @FilePath: 系统对话框.html
 * @Author: 苏苏少年
 * @Date: 2022-12-05 18:40:46
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button onclick="testAlert()">弹出框</button>
    <button onclick="testPrompt()">输入框</button>
    <button onclick="testConfirm()">确认框</button>
    <script>
        function testAlert(){
            alert("hello,弹出框");
        }
        
        function testPrompt(){
            var name = prompt("请输入你的姓名","");
            alert(name);
        }

        function testConfirm(){
            var flag = confirm("你确认删除微信好友吗?");
            if(flag){
                alert("是的,定期清理微信..")
            } else{
                alert("微信很干净,不需要清理好友!")
            }
        }

    </script>
    
</body>
</html>